<style>
    #container{
        width: 400px;
        height: 400px;
    }
</style>
<div class="form-group">
    <label for="c-area_id" class="control-label col-xs-12 col-sm-2"></label>
    <div class="col-xs-12 col-sm-8">
        <button type="button" id="iframes" class="btn btn-info">点击获取定位地址</button>
    </div>
</div>
<div class="form-group [address_div]">
    <label for="c-area_id" class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
    <div class="col-xs-12 col-sm-8">
        <input id="c-address" data-rule="required" class="form-control address" name="row[address]" type="text" v-model="keyword" data-value="" ref="keyword" value="[addressValue]">
    </div>
</div>
<div class="form-group [latlng_div]">
    <label for="c-lat" class="control-label col-xs-12 col-sm-2">{:__('Lat')}:</label>
    <div class="col-xs-12 col-sm-8">
        <input id="c-lat" data-rule="required" class="form-control lat" name="row[lat]" type="text" v-model="lat" data-value="" ref="lat" value="[latValue]">
    </div>
</div>
<div class="form-group [latlng_div]">
    <label for="c-lng" class="control-label col-xs-12 col-sm-2">{:__('Lng')}:</label>
    <div class="col-xs-12 col-sm-8">
        <input id="c-lng" data-rule="required" class="form-control lng" name="row[lng]" type="text" v-model="lng" data-value="" ref="lng" value="[lngValue]">
    </div>
</div>

<script>
    window.onload = function () {
        require.config({
            paths: {
                'jquery': '../libs/jquery/dist/jquery.min',
                'layer': '../libs/fastadmin-layer/dist/layer'
            }
        });
        require(['jquery', 'layer'],function($, layer){
            $('#iframes').on('click', function(){
                // 禁用按钮防止重复提交
                $("#job_address").attr({ disabled: "disabled" });//不加的话容易滑屏...
                layer.open({
                    type: 2,
                    title: '腾讯地图定位',
                    maxmin: false,
                    shadeClose: true, //点击遮罩关闭层
                    area: ['550px', '105%'],
                    content: ["/map/map.html",'no']
                });
            });
        });
    }
</script>